class Log < ActiveRecord::Base
belongs_to :user
belongs_to :project
def self.info(project=nil,name=nil,type=nil,label=nil,user=nil)
 log = self.new
 log.project = project
 log.name = name
 log.type_id = type
 log.label = label
 log.user = user
 return  log.save
end

def day
 self.created_at
end
def type
  TYPE_EXT[self.type_id]
end
end
